package com.atom.module.mvvm.adapter

import android.text.Editable
import android.text.TextWatcher
import android.widget.TextView

abstract class TextWatcherEvent : ObservableEvent<TextView, Unit>(), TextWatcher {

    override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {

    }

    override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {

    }

    override fun afterTextChanged(s: Editable?) {

    }

    final override fun invoke(t: TextView) {
        throw RuntimeException("TextWatcherEvent can not invoke")
    }

}
